package com.example.sellqq.domain;

import jdk.nashorn.internal.objects.annotations.Getter;
import jdk.nashorn.internal.objects.annotations.Setter;

import javax.persistence.*;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
 * @Author: thekernel
 * @Date: 2020/4/19 23:57
 * @Version: 1.0
 * @Description: user 表
 */
@Entity
@Table(name = "user")
public class User implements Serializable {

    private static final long serialVersionUID = 6222176558369919436L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    @NotEmpty(message = "qq号不能为空")
    @Size(min = 5, max = 11, message = "QQ号长度必须长于4位，短于12位")
    @NotNull(message = "qq号参数不能为空")
    private String qq;

    @NotNull(message = "姓名参数必须上传")
    @NotEmpty(message = "姓名不能为空")
    private String name;

    @NotEmpty(message = "身份证正面不能为空")
    @NotNull(message = "身份证正面参数必须上传")
    private String imageFront;

    @NotEmpty(message = "身份证反面不能为空")
    @NotNull(message = "身份证反面必须上传")
    private String imageBack;

    @NotEmpty(message = "手持身份证不能为空")
    @NotNull(message = "手持身份证必须上传")
    private String imageHand;

    @NotEmpty(message = "身份证不能为空")
    @NotNull(message = "身份证必须上传")
    private String idCard;

    private String location;

    private String devId;

    private String devModel;

    private Boolean status;

    private Date createTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getImageFront() {
        return imageFront;
    }

    public void setImageFront(String imageFront) {
        this.imageFront = imageFront;
    }

    public String getImageBack() {
        return imageBack;
    }

    public void setImageBack(String imageBack) {
        this.imageBack = imageBack;
    }

    public String getImageHand() {
        return imageHand;
    }

    public void setImageHand(String imageHand) {
        this.imageHand = imageHand;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getDevId() {
        return devId;
    }

    public void setDevId(String devId) {
        this.devId = devId;
    }

    public String getDevModel() {
        return devModel;
    }

    public void setDevModel(String devModel) {
        this.devModel = devModel;
    }

    public Boolean getStatus() {
        return status;
    }

    public void setStatus(Boolean status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", qq='" + qq + '\'' +
                ", name='" + name + '\'' +
                ", imageFront='" + imageFront + '\'' +
                ", imageBack='" + imageBack + '\'' +
                ", location='" + location + '\'' +
                ", devID='" + devId + '\'' +
                ", devModel='" + devModel + '\'' +
                ", status=" + status +
                ", createTime=" + createTime +
                '}';
    }
}
